﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" CodeBehind="ServiceAgreements.aspx.cs" Inherits="doris.Admin.ServiceAgreements" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ServiceAgreementID,SerivceID,CompanyID" 
        CssClass="dorisGrid" AlternatingRowStyle-CssClass="alt" 
        DataSourceID="SqlDataSource1">
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="ServiceAgreementID" HeaderText="ServiceAgreementID" 
                InsertVisible="False" ReadOnly="True" SortExpression="ServiceAgreementID" 
                Visible="False" />
            <asp:TemplateField HeaderText="Service" SortExpression="Service">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Service") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Service") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="ConnectionName" HeaderText="ConnectionName" 
                SortExpression="ConnectionName" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:localConnectionString %>" 
        DeleteCommand="deleteServiceAgreement" DeleteCommandType="StoredProcedure" 
        ProviderName="<%$ ConnectionStrings:localConnectionString.ProviderName %>" 
        SelectCommand="getAllServiceAgreements" 
    SelectCommandType="StoredProcedure" ondeleting="SqlDataSource1_Deleting">
        <DeleteParameters>
            <asp:Parameter Name="in_serviceagreementid" Type="Int32" />
        </DeleteParameters>
    </asp:SqlDataSource>
    <br /><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/Services.aspx">Legg til tjenester</asp:HyperLink>&nbsp;
    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Admin/Companies.aspx">Legg til firmaer</asp:HyperLink>
    <br /><asp:HyperLink runat="server" NavigateUrl="~/Admin/ServiceAgreement.aspx">Legg til ny</asp:HyperLink>
</asp:Content>
